<!DOCTYPE html>
<html>
<head>
	<title>风险点检索</title>
	<meta content="" name="keywords" />
	<meta content="" name="description" />
	<meta charset="utf-8" />
	<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
	<meta name="apple-mobile-web-app-capable" content="yes" />
	<meta name="apple-touch-fullscreen" content="yes">
	<meta name="format-detection" content="telephone=no" />
	<link rel="stylesheet" href="/css/style.css" />
	<script type="text/javascript" src="/js/jquery-2.1.4.min.js"></script>
</head>
<body style="background: #F2F2F2;">

<!-- <div class="top2"><p>风险点检索</p></div> -->
<div class="fxdser">
	<form class="serach" action="/check/group_search/{{$id}}" method="post">
		{{ csrf_field() }}
		<input class="text" type="text" name="keyword" placeholder="请输入关键字进行搜索" />
		<input class="sub" type="submit" value="搜  索" name="" />
		<div style="clear: both;"></div>
	</form>
	<a class="gjsx" href="/check/high_search/{{$id}}">高级筛选</a>
	<a class="fenlei" href="javascript:void(0)" id="ClickMe">分类</a>
	<div style="clear: both;"></div>
</div>
<div class="fxdcon">
	@foreach ($indexdata as $k=>$v)
		<dl>
			<dt>{{$k}}</dt>
			<dd>
				@foreach ($v as $v1)
					<a href="/check/show/{{$id}}/group/{{$v1->id}}">{{$v1->name}}</a>
				@endforeach
			</dd>
		</dl>
	@endforeach
</div>
<!-- 弹窗 -->
<div id="goodcover"></div>
<div id="code2">
	<ul id="lists">
		{{--		@foreach ($data as $v)--}}
		{{--		<li><a href="javascript:void(0)" class="">{{$v->name}}</a></li>--}}
		{{--		@endforeach--}}
		<li><a href="javascript:void(0)" class="selected">人的不安全行为</a></li>
		<li><a href="javascript:void(0)" class="">物的不安全行为</a></li>
		<li><a href="javascript:void(0)" class="">作业环境的缺陷</a></li>
		<li><a href="javascript:void(0)" class="">安全管理的缺陷</a></li>
	</ul>
	<div id="brand_con">
		{{--		@foreach ($entrydata as $v)--}}
		{{--		<div class="tag" style="display:block">--}}
		{{--			@foreach ($v as $v1)--}}

		{{--			<a href="xianchang3.html">{{$v1->entry}}</a>--}}
		{{--			@endforeach--}}
		{{--			<a href="xianchang3.html">有色行业</a>--}}
		{{--			<a href="xianchang3.html">建材行业</a>--}}
		{{--			<a href="xianchang3.html">机械行业</a>--}}
		{{--			<a href="xianchang3.html">轻工行业</a>--}}
		{{--			<a href="xianchang3.html">纺织行业</a>--}}
		{{--			<a href="xianchang3.html">烟草行业</a>--}}
		{{--			<a href="xianchang3.html">商贸行业</a>--}}
		{{--		</div>--}}
		{{--		@endforeach--}}

		<div class="tag" style="display:block">
			@foreach ($data as $v)
				@if($v->status == 1)
					<a href="/check/show/{{$id}}/group/{{$v->id}}">{{$v->name}}</a>
				@endif
			@endforeach
		</div>
		<div class="tag" style="display:none">
			@foreach ($data as $v)
				@if($v->status == 2)
					<a href="/check/show/{{$id}}/group/{{$v->id}}">{{$v->name}}</a>
				@endif
			@endforeach
		</div>
		<div class="tag" style="display:none">
			@foreach ($data as $v)
				@if($v->status == 3)
					<a href="/check/show/{{$id}}/group/{{$v->id}}">{{$v->name}}</a>
				@endif
			@endforeach
		</div>
		<div class="tag" style="display:none">
			@foreach ($data as $v)
				@if($v->status == 4)
					<a href="/check/show/{{$id}}/group/{{$v->id}}">{{$v->name}}</a>
				@endif
			@endforeach
		</div>
	</div>
</div>

<script>
	$(function() {
		//alert($(window).height());
		$('#ClickMe').click(function() {
			$('#code2').center();
			$('#goodcover').show();
			$('#code2').fadeIn();
		});
		$('#closebt').click(function() {
			$('#code2').hide();
			$('#goodcover').hide();
		});
		$('#goodcover').click(function() {
			$('#code2').hide();
			$('#goodcover').hide();
		});
		jQuery.fn.center = function(loaded) {
			var obj = this;
			body_width = parseInt($(window).width());
			body_height = parseInt($(window).height());
			block_width = parseInt(obj.width());
			block_height = parseInt(obj.height());

			left_position = parseInt((body_width / 2) - (block_width / 2) + $(window).scrollLeft());
			if (body_width < block_width) {
				left_position = 0 + $(window).scrollLeft();
			};

			top_position = parseInt((body_height / 2) - (block_height / 2) + $(window).scrollTop());
			if (body_height < block_height) {
				top_position = 0 + $(window).scrollTop();
			};

		}

	})
</script>
<script>
	var tabs=function(){
		function tag(name,elem){
			return (elem||document).getElementsByTagName(name);
		}
		//获得相应ID的元素
		function id(name){
			return document.getElementById(name);
		}
		function first(elem){
			elem=elem.firstChild;
			return elem&&elem.nodeType==1? elem:next(elem);
		}
		function next(elem){
			do{
				elem=elem.nextSibling;
			}while(
					elem&&elem.nodeType!=1
					)
			return elem;
		}
		return {
			set:function(elemId,tabId){
				var elem=tag("li",id(elemId));
				var tabs=tag("div",id(tabId));
				var listNum=elem.length;
				var tabNum=tabs.length;
				for(var i=0;i<listNum;i++){
					elem[i].onclick=(function(i){
						return function(){
							for(var j=0;j<tabNum;j++){
								if(i==j){
									tabs[j].style.display="block";
									//alert(elem[j].firstChild);
									elem[j].firstChild.className="selected";
								}
								else{
									tabs[j].style.display="none";
									elem[j].firstChild.className="";
								}
							}
						}
					})(i)
				}
			}
		}
	}();
	tabs.set("lists","brand_con");//执行
</script>

</body>
</html>